<script setup>
let msg ="hello vue3"
let getMsg= ()=>{
  return 'hello vue3 message'
}
let age = 19
let bee = '蜜 蜂'
// 购物车
const carts = [{name:'可乐',price:3,number:10},{name:'薯片',price:6,number:8}];
//计算购物车总金额
function compute(){
  let count = 0;
  for(let index in carts){
    count += carts[index].price*carts[index].number;
  }
  return count;
}
</script>

<template>
<div>
  msg:{{ msg}}
  <br>
  getMsg:{{ getMsg()}}
  <br>
  age:{{ age}}
  <br>
  bee:{{ bee}}
  <br>
  购物车总金额:{{compute()}}

</div>
</template>

<style scoped>

</style>